package com.tedu.bill;

/**
 * Author：毕龙
 * Date: 2024/3/24 14:41
 */


public class TestFunctionArgument {

    public static void main(String[] args) {
        /**
         ----------
         窗前明月光
         --------------
         疑是地上霜
         ----------
         举头望明月
         --------------
         低头思故乡
         ----------
        函数调用时传递的参数称之为实参
         */
        printSplitSymbol(5,'+',"床前明月光");

        printSplitSymbol(10,'-',"疑是地上霜");

        printSplitSymbol(15,'=',"巨头望明月");

        printSplitSymbol(20,'*',"低头思平安");

        printSplitSymbol(25,'~',"");
    }
    //打印不同数量的分隔符
    //函数的定义时  参数称之为形参
    public static void printSplitSymbol(int num,char sign,String msg){
        for (int i = 0; i < num; i++) {
            System.out.print(sign);
        }
        System.out.println();
        System.out.println(msg);
    }


}
